/**
 * 
 */
package src.dataStructures;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import src.categoryStructures.Categories;


/**
 * This class contains information on a particular item
 * @author John Stewart
 */
public class Item extends Data {

	// These are the system controlled variables
	public String author;
	public int authorid;
	public Categories categories = new Categories();
	
	// These variables are free to edit
	
	public Item(int id, String name) {
		this.id = id;
		this.name = name;
		detail = DetailLevel.EFFICIENT;
	}
	
	/**
	 * Blank Constructor
	 */
	public Item() {
		detail = DetailLevel.EMPTY;
	}

	public Data copyFull(Data data) {
		if (data instanceof Item) {
			Item item = (Item) data;
			item.author = author;
			item.authorid = authorid;
			item.categories = categories.copy();
		}
		return super.copyFull(data);
	}

	public Data copy(Data data) {
		if (data instanceof Item) {
			Item item = (Item) data;
			switch (data.detail) {
			case FULL:
			case PUBLIC:
			case BRIEF:
			case EFFICIENT:
			case EMPTY:
			default:
			}
		}
		return super.copy(data);
	}
	
	public String toString() {
		return "Item | ID: "+id+" | Name: "+name+" | DetailLevel.FULL? "+(detail==DetailLevel.FULL);
	}
	
}
